from django.urls import re_path
from rest_framework.routers import DefaultRouter, SimpleRouter

from xyz.views import search, image, user , recruit, spit

urlpatterns = [
    re_path(r'^upload/avatar/$', image.UserTXView.as_view()),
    re_path(r'^upload/common/$', image.UploadCommonView.as_view()),
    re_path(r'^users/like/(?P<id>\d+)/$', user.UserLikeView.as_view()),
    re_path(r'^user/password/$', user.UserPasswordView.as_view()),
    re_path(r'^user/label/$', user.UserLeabelView.as_view()),
    re_path(r'^user/$', user.UserInfoView.as_view()),
    re_path(r'^article/(?P<id>\d+)/publish_comment/$', search.PublishCommentView.as_view()),
    re_path(r'^recruits/search/city/keyword/$', recruit.RecruitAPIView.as_view()),
    re_path(r'^spit/(?P<id>\d+)/$', spit.SpitInfoView.as_view()),

]
# router = DefaultRouter()
router = SimpleRouter()

router.register('articles/search', search.ArticleSearchView, base_name='search')

urlpatterns += router.urls
